package com.me.mygdxgame;

import java.awt.Rectangle;

public class Box {

	int x,y;
	int h,w;
	
	public Box(int x, int y,int h,int w){
		this.x=x;
		this.y=y;
		this.h=h;
		this.w=w;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getH() {
		return h;
	}

	public void setH(int h) {
		this.h = h;
	}

	public int getW() {
		return w;
	}

	public void setW(int w) {
		this.w = w;
	}
	
	public boolean intersects(Box box){
		Rectangle r=new Rectangle(x,y,w,h);
		return r.intersects(box.x,box.y,box.w,box.h);
	}
	
}
